﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BLToolkit.Data;
using BLToolkit.Common;
using BLToolkit.DataAccess;
using BLToolkit.Mapping;

namespace Mc.Fe.Entities
{
    [TableName("FAC04_CABFACTURA")]
    public class Factura
    {
        #region Primitive Properties
        [MapField("FAC04CODEMP")]
        public virtual string CodigoEmpresa
        {
            get;
            set;
        }
        [MapField("FAC01COD")]
        public virtual string CodigoTipoDocumento
        {
            get;
            set;
        }
        [MapField("FAC04NUMDOC")]
        public virtual string NumDocumento
        {
            get;
            set;
        }
        [MapField("FAC04AA")]
        public virtual string Anio
        {
            get;
            set;
        }
        [MapField("FAC04MM")]
        public virtual string Mes
        {
            get;
            set;
        }
        [MapField("FAC04NRODOC")]
        public virtual string NroDocumento
        {
            get;
            set;
        }
        [MapField("FAC04SERIEDOC")]
        public virtual string Serie
        {
            get;
            set;
        }
        [MapField("FAC04FECHA")]
        public virtual Nullable<System.DateTime> Fecha
        {
            get;
            set;
        }
        [MapField("FAC04TIPANA")]
        public virtual string FAC04TIPANA
        {
            get;
            set;
        }
        [MapField("FAC04CODCLI")]
        public virtual string CodigoCliente
        {
            get;
            set;
        }
        [MapField("FAC04MONEDA")]
        public virtual string Moneda
        {
            get;
            set;
        }
        [MapField("FAC04TIPCAMBIO")]
        public virtual Nullable<double> TipoCambio
        {
            get;
            set;
        }
        [MapField("FAC04DONSUBTOTAL")]
        public virtual Nullable<double> FAC04DONSUBTOTAL
        {
            get;
            set;
        }
        [MapField("FAC04DONIGV")]
        public virtual Nullable<double> FAC04DONIGV
        {
            get;
            set;
        }
        [MapField("FAC04DONTOTAL")]
        public virtual Nullable<double> FAC04DONTOTAL
        {
            get;
            set;
        }
        [MapField("FAC03COD")]
        public virtual string FAC03COD
        {
            get;
            set;
        }
        [MapField("FAC02COD")]
        public virtual string FAC02COD
        {
            get;
            set;
        }
        [MapField("FAC04CLINOMBRE")]
        public virtual string NombreCliente
        {
            get;
            set;
        }
        [MapField("FAC04CLIDIRECCION")]
        public virtual string DireccionCliente
        {
            get;
            set;
        }
        [MapField("FAC04CLIRUC")]
        public virtual string RucCliente
        {
            get;
            set;
        }
        [MapField("FAC04GLOSA")]
        public virtual string Glosa
        {
            get;
            set;
        }
        [MapField("FAC04DONGLAG")]
        public virtual string FAC04DONGLAG
        {
            get;
            set;
        }
        [MapField("FAC04IGV")]
        public virtual Nullable<double> FactorIgv
        {
            get;
            set;
        }
        [MapField("FAC04IMPSUBTOTAL")]
        public virtual Nullable<double> ImporteSubTotal
        {
            get;
            set;
        }
        [MapField("FAC04IMPIGV")]
        public virtual Nullable<double> ImporteIGV
        {
            get;
            set;
        }
        [MapField("FAC04IMPTOTAL")]
        public virtual Nullable<double> ImporteTotal
        {
            get;
            set;
        }
        [MapField("FAC04GUIAS")]
        public virtual string NroGuias
        {
            get;
            set;
        }
        [MapField("FAC04DOCMODTIPDOC")]
        public virtual string TipoDocumentoReferencia
        {
            get;
            set;
        }
        [MapField("FAC04DOCMODNRO")]
        public virtual string NroDocumentoReferencia
        {
            get;
            set;
        }
        [MapField("FAC04DOCMODFECHA")]
        public virtual Nullable<System.DateTime> FAC04DOCMODFECHA
        {
            get;
            set;
        }
        [MapField("FAC03TIPART")]
        public virtual string FAC03TIPART
        {
            get;
            set;
        }
        [MapField("FAC04TIPMOTEMI")]
        public virtual string FAC04TIPMOTEMI
        {
            get;
            set;
        }
        [MapField("FAC04TIPMOTEMIDES")]
        public virtual string Motivo
        {
            get;
            set;
        }
        [MapField("FAC04ESTADODOC")]
        public virtual string FAC04ESTADODOC
        {
            get;
            set;
        }
        [MapField("FAC04CONTASIENTOTIPO")]
        public virtual string FAC04CONTASIENTOTIPO
        {
            get;
            set;
        }
        [MapField("FAC04CONTLIBRO")]
        public virtual string FAC04CONTLIBRO
        {
            get;
            set;
        }
        [MapField("FAC04CONTVOUCHER")]
        public virtual string FAC04CONTVOUCHER
        {
            get;
            set;
        }
        [MapField("FAC04ESTADOCONTABLE")]
        public virtual string FAC04ESTADOCONTABLE
        {
            get;
            set;
        }
        [MapField("FAC04ATENCIONESGLAG")]
        public virtual string FAC04ATENCIONESGLAG
        {
            get;
            set;
        }
        [MapField("FAC04liquilinea1")]
        public virtual string LiquidacionLinea1
        {
            get;
            set;
        }
        [MapField("FAC04liquilinea2")]
        public virtual string LiquidacionLinea2
        {
            get;
            set;
        }

        [MapField("FAC04IMPLETRAS")]
        public string ImporteLetras
        {
            get;
            set;
        }

        public string ReferenciaId
        {
            get;
            set;
        }

        public virtual string NroDocumentoReferenciaSUNAT
        {
            get;
            set;
        }
        #endregion

        #region Relaciones
        public List<DetalleFactura> Detalles { get; set; }
        #endregion
    }
}
